;;; dotemacs.el --- 
;; 
;; Author: Corey Oliver
;; Last-Updated: Thu Sep  2 16:36:17 2010 (UTC)
;; 
;; Description: Corey Oliver's Emacs startup, run from .emacs or
;; _emacs

;; A sample .emacs:
;; (setq load-path (cons "~/.emacs.d" load-path))

;; ;; The facility where this .emacs file recides. Such as "work",
;; ;; "home", "school", etc.
;; (defvar emacs-src "home")

;; (load "dotemacs")

;;; An attempt to mimic Steve Yegge's .emacs file (see
;;; http://sites.google.com/site/steveyegge2/my-dot-emacs-file)

;; For a good elisp coding reference visit:
;; http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html

;; I use the Common Lisp stuff all the time
(require 'cl)

(defvar emacs-root (cond
	((equal emacs-src "school")
		"/mnt/nfs/netapp2/students/cjoliver/")
	((equal emacs-src "work")
		"/cygdrive/c/cygwin/home/oliverc/")
	((equal emacs-src "home")
		"/home/coreyoliver/"))
 "My home directory -- the root of my personal emacs load-path.")

;; add all the elisp directories under ~/.emacs.d to my load path
(labels ((add-path (p)
	 (add-to-list 'load-path
			(concat emacs-root p))))
   (add-path ".emacs.d/lisp") ;; all my personal elisp code
   (add-path ".emacs.d/site-lisp") ;; elisp stuff I find on the web
   (add-path ".emacs.d/jde-2.4.0.1/lisp") ;; Java IDE support
   (add-path ".emacs.d/jde-2.4.0.1/elib-1.0")
   (add-path ".emacs.d/jde-2.4.0.1/eieio-0.17")
   (add-path ".emacs.d/jde-2.4.0.1/speedbar-0.14beta4")
   (add-path ".emacs.d/jde-2.4.0.1/semantic-1.4.4")

   (add-path ".emacs/site-lisp/nxml-mode") ;; XML support
   (add-path ".emacs/site-lisp/tuareg-2.01") ;; OCaml support
   (add-path ".emacs.d/site-lisp/gnuplot-mode") ;; Gnuplot support
   (add-path ".emacs.d/site-lisp/haskell-mode") ;; Haskell support
   (add-path ".emacs.d/site-lisp/lilypond-mode") ;; Lilypond support
   (add-path ".emacs.d/site-lisp/color-theme") ;; Customizable theme support
   ;; Add a modular in-buffer completion mechanism (like that available
   ;; in many IDEs);
   (add-path ".emacs.d/site-lisp/company")
)

;; I use the same .emacs and elisp files everywhere. I need to make
;; sure they work in all these places!
(require 'emacs-type) ;; support for multiple emacs platforms
(load-library "ekeys") ;; my key bindings and some aliases
(load-library "modes") ;; configuration for 100-odd emacs modes
(if nil window-system
 (progn (ignore-errors (require 'jde))
	(load-library "my-font"))) ;; my own fonts and window colors
(load-library "efuncs") ;; a bunch of my own utility functions
(load-library "my-config") ;; one-off variable settings
(load-library "screen-config") ;; window positioning for all platforms

;; A file to disable/enable third-party features found in site-list
;; (useful when experimenting with new features).
(load-library "enable-features")

;; I always run a shell in Emacs. Always always.
(shell)
